package cn.chinaunicom.fast.common.exception;

import lombok.Getter;

@Getter
public enum AuthErrorType implements ErrorType {

    INVALID_REQUEST("401", "无效请求"),
    INVALID_CLIENT("402", "无效client_id"),
    INVALID_GRANT("403", "无效授权"),
    INVALID_SCOPE("404", "无效scope"),
    INVALID_TOKEN("405", "无效token"),
    INSUFFICIENT_SCOPE("406", "授权不足"),
    REDIRECT_URI_MISMATCH("407", "redirect url不匹配"),
    ACCESS_DENIED("408", "拒绝访问"),
    METHOD_NOT_ALLOWED("409", "不支持该方法"),
    SERVER_ERROR("410", "权限服务错误"),
    UNAUTHORIZED_CLIENT("411", "未授权客户端"),
    UNAUTHORIZED("412", "未授权"),
    UNSUPPORTED_RESPONSE_TYPE("413", " 支持的响应类型"),
    UNSUPPORTED_GRANT_TYPE("414", "不支持的授权类型"),
    USER_PSWD_ERROR("415", "用户名或密码不正确"),
    USER_LOGIN_ERROR("416", "登录错误次数已经超过五次!请稍后重试!");

    /**
     * 错误类型码
     */
    private String code;
    /**
     * 错误类型描述信息
     */
    private String mesg;

    AuthErrorType(String code, String mesg) {
        this.code = code;
        this.mesg = mesg;
    }

}
